/*
 *NOTE:Auto generated service implement
*/
package com.surfilter.modules.comUser.service.impl;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Service;

import com.surfilter.modules.comUser.dao.HtComUserDao;
import com.surfilter.modules.comUser.model.ComUserQueryCondition;
import com.surfilter.modules.comUser.model.HtComUserModel;
import com.surfilter.modules.comUser.service.ComUserMgrService;
import com.surfilter.platform.base.model.ActionPermission;
import com.surfilter.platform.base.model.PageInfo;
import com.surfilter.platform.base.model.ParameterClassType;
import com.surfilter.platform.base.model.ParameterInfo;
import com.surfilter.platform.base.model.ParameterMapper;
import com.surfilter.platform.base.model.PermissionMethodType;
import com.surfilter.platform.base.service.ServiceBase;
import com.surfilter.platform.base.util.ParaUtil;

@Service(value = "comUserMgrService")
public class ComUserMgrServiceImpl extends ServiceBase implements ComUserMgrService {

	@Resource
	private HtComUserDao htComUserDao;

	
	@ActionPermission(actionName = "addHtComUser",remark = "添加住户")
	public java.lang.Integer addHtComUser(HtComUserModel htComUserModel, HttpServletRequest request) {
		return htComUserDao.addHtComUser(htComUserModel);
	}
	
	@ActionPermission(actionName = "chgHtComUser",remark = "修改住户")
	public void chgHtComUser(HtComUserModel htComUserModel, HttpServletRequest request) {
		htComUserDao.chgHtComUser(htComUserModel);
	}
	
	@ActionPermission(actionName = "delHtComUser",remark = "")
	public void delHtComUser(HtComUserModel htComUserModel, HttpServletRequest request) {
		htComUserDao.delHtComUser(htComUserModel);
	}
	
	@ActionPermission(actionName = "getHtComUsers",remark = "获取住户",permission=PermissionMethodType.MODULE)
	public List<HtComUserModel> getHtComUsers(ComUserQueryCondition condition, HttpServletRequest request) {
		return htComUserDao.getHtComUsers(condition, PageInfo.getPageInfo(request));
	}
	
	@ActionPermission(actionName = "delHtComUsers",remark = "批量删除住户")
	public boolean delHtComUsers(HttpServletRequest request){
		List<Integer> ids = ParaUtil.getJSONList(request, "ids", Integer.class);
		htComUserDao.delHtComUsers(ids);
		return true;
	}
	
	@ActionPermission(actionName = "getHtComUsersCount",remark = "")
	public int getHtComUsersCount(ComUserQueryCondition condition) {
		return htComUserDao.getHtComUsersCount(condition);
	}
	}
